package com.demo.gulimall.seckill.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 秒杀活动商品关联
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sms_seckill_sku_relation")
public class SeckillSkuRelation implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 活动id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`promotion_id`")
	private Long promotionId;

	/** 活动场次id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`promotion_session_id`")
	private Long promotionSessionId;

	/** 商品id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`sku_id`")
	private Long skuId;

	/** 秒杀价格 */
	@TableField(value = "`seckill_price`")
	private BigDecimal seckillPrice;

	/** 秒杀总量 */
	@TableField(value = "`seckill_count`")
	private Integer seckillCount;

	/** 每人限购数量 */
	@TableField(value = "`seckill_limit`")
	private Integer seckillLimit;

	/** 排序 */
	@TableField(value = "`seckill_sort`")
	private Integer seckillSort;

}
